package com.bestcem.xm.ticket.service.manager.record.dto;

import com.bestcem.xm.ticket.entity.mongo.TicketRecord;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 审核 工单进度自定义参数
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @date 2021/8/18 15:35
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class AuditedCustomAttrDTO {
    /**
     * content
     */
    private String content;
    /**
     * isAgreed
     */
    private Boolean isAgreed;
    /**
     * auditHandle
     */
    private Integer auditHandle;
    /**
     * timeLimit
     */
    private Integer timeLimit;

    /**
     * timeLimitType
     */
    private Integer timeLimitType;
    /**
     * transferFollowDeadline
     */
    private Date transferFollowDeadline;

    /**
     * 获取工单审核进度自定义参数
     *
     * @return 工单审核进度自定义参数
     * @author XiaoYunSong <ys.xiao@idiaoyan.com>
     * @date 2021/8/19 11:27
     */
    public TicketRecord.CustomAttr getCustomAttr() {
        TicketRecord.CustomAttr customAttr = new TicketRecord.CustomAttr();
        customAttr.setContent(this.content);
        customAttr.setIsAgreed(this.isAgreed);
        customAttr.setAuditHandle(this.auditHandle);
        customAttr.setTimeLimit(this.timeLimit);
        customAttr.setTimeLimitType(this.timeLimitType);
        return customAttr;
    }
}